﻿//axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// 发送请求前处理request的数据
axios.defaults.transformRequest = [function (data) {
    // Do whatever you want to transform the data
    var newData = '';
    for (var k in data) {
        newData += encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) + '&';
    }
    return newData;
}]

//axios.defaults.transformResponse = [function (data) {
//    // 对 data 进行任意转换处理

//    return data;
//}]